<div id="tab-system" class="HuiTab">
	<div class="tabBar cl">
		<span onclick="HtmlRender('${BASE}/admin/sys/role/list')">角色列表</span>
		<span class="current">添加角色</span>
	</div>
	<br>
</div>
<div class="row cl">
  <form action="${BASE}/admin/sys/role/addSave" id="form_add_save_role" method="post" class="form form-horizontal">
    <div class="col-xs-9">
      <div class="row cl">
        <label class="form-label col-xs-3"><span class="c-red">*</span>角色名称：</label>
        <div class="formControls col-xs-6">
          <input type="text" id="name" name="name" value="" ajaxurl="${BASE}/admin/sys/role/checkQu" datatype="*2-16" nullmsg="角色名称不能为空" class="input-text">
        </div>
        <div class="col-xs-3"> </div>
      </div>
      <div class="row cl">
        <label class="form-label col-xs-3"><span class="c-red">*</span>英文标识：</label>
        <div class="formControls col-xs-6">
          <input type="text" id="enname" name="enname" value="" datatype="*2-16" nullmsg="英文标识不能为空" class="input-text">
        </div>
        <div class="col-xs-3"> </div>
      </div>
      <div class="row cl">
        <label class="form-label col-xs-3">描述：</label>
        <div class="formControls col-xs-6">
          <textarea id="summary" name="summary" cols="" rows="" class="textarea"  placeholder="角色描述...200个字符以内" dragonfly="true" onKeyUp="textarealength(this,200)"></textarea>
          <p class="textarea-numberbar"><em class="textarea-length">0</em>/200</p>
        </div>
        <div class="col-xs-3"> </div>
      </div>
      <div class="row cl">
        <label class="form-label col-xs-3"><span class="c-red">*</span>状态：</label>
        <div class="formControls col-xs-6 skin-minimal">
          <div class="radio-box"><input type="radio" id="state-1" name="state" value="1" checked><label for="sex-1">启用</label></div>
          <div class="radio-box"><input type="radio" id="state-2" name="state" value="0"><label for="sex-2">未启用</label></div>
        </div>
        <div class="col-xs-3"> </div>
      </div>
      <div class="row cl">
        <div class="col-xs-10 col-xs-offset-2">
          <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;保存&nbsp;&nbsp;">
        </div>
      </div>
    </div>
    
    <div class="col-xs-3">
      <div class="panel panel-default">
        <div class="panel-header">说明</div>
        <div class="panel-body">关于角色的说明</div>
      </div>
    </div>
  </form>
</div>

<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	$("#form_add_save_role").Validform({
		tiptype:2,
		ajaxPost:true,
		postonce:true,
		callback:function(data){
			$.Hidemsg();
			if("200"==data.retCode){
				layer.msg('保存成功！', {icon: 6,offset: '45px'});
				HtmlRender("${BASE}/admin/sys/role/list");
			}else{
				layer.msg('保存失败！', {icon: 5,offset: '45px'});
			}
		}
	});
});
</script>